import  {createSlice} from  "@reduxjs/toolkit";


let numSlice = createSlice({
    name:"numInfo",
    initialState:{
        num:10
    },
    reducers:{
        "add":(state,action)=>{
            console.log(state);
            console.log(action);
            return  {num:state.num+action.payload}
        }
    }
})

export const  {add} = numSlice.actions;

export  default  numSlice.reducer;